# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libmwaw
pkgver=0.3.21
pkgrel=0
pkgdesc="Import filter and tools for old Mac documents"
url="https://sourceforge.net/projects/libmwaw/"
arch="all"
license="MPL-2.0"
makedepends="librevenge-dev zlib-dev doxygen"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://downloads.sourceforge.net/project/libmwaw/libmwaw/libmwaw-$pkgver/libmwaw-$pkgver.tar.bz2"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

sha512sums="
43b3c1fbec3258d7fb728c5f7223801dee42db871751ad01608277c0e9a915c0ef12afb41be6309a4cc80f53d72f3c33b93d631f39a2ae6944333cb70a6473d2  libmwaw-0.3.21.tar.bz2
"
